package com.weipeep.proxy;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

public class Test {


    public static void main1(String[] args) {
        Student student = new Student();
        student.setA("1");
        student.setB("2");
        student.setC("3");
        student.setD("4");
        StuInvocationHandler stuInvocationHandler = new StuInvocationHandler<Student>(student);
        Person stuProxy = (Person) Proxy.newProxyInstance(Person.class.getClassLoader(), new Class<?>[]{Person.class}, stuInvocationHandler);
        stuProxy.lianjie();
    }

    public static void main(String[] args) throws ClassNotFoundException {
        Class stu = Class.forName("com.weipeep.proxy.Student");
        Annotation[] stuAnnotations = stu.getAnnotations();
        Method[] stuDeclaredMethods = stu.getDeclaredMethods();
        Method[] stuMethods = stu.getMethods();
        Field[] stuFields = stu.getFields();
        Field[] stuDeclaredFields = stu.getDeclaredFields();
        System.out.println(11);
    }
}
